//
// Dreams Gate Launcher
// www.dg8.ru
//
// GNU GPL v3
//
// qbootDlg.h : header file
//

#pragma once

class CqbootDlgAutoProxy;


// CqbootDlg dialog
class CqbootDlg : public CDHtmlDialog
{
	DECLARE_DYNAMIC(CqbootDlg);
	friend class CqbootDlgAutoProxy;

// Construction
public:
	CqbootDlg(CWnd* pParent = NULL);	// standard constructor
	virtual ~CqbootDlg();

// Dialog Data
	enum { IDD = IDD_QBOOT_DIALOG, IDH = IDR_HTML_QBOOT_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	HRESULT OnSwitchLang(IHTMLElement *pElement);
	HRESULT OnButtonOK(IHTMLElement *pElement);
	HRESULT OnButtonCancel(IHTMLElement *pElement);
	HRESULT OnButtonUpdate(IHTMLElement *pElement);
	HRESULT OnButtonDocuments(IHTMLElement *pElement);

// Implementation
protected:
	CqbootDlgAutoProxy* m_pAutoProxy;
	HICON m_hIcon;

	TCHAR my_documents[MAX_PATH];
	CString game_user_dir;
	IHTMLElement *el_log;

	BOOL CanExit();

	void log(const char * info);
	void log(LPCTSTR info, ...);

	// Generated message map functions
	virtual BOOL OnInitDialog();
	virtual void OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl);
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	virtual void OnOK();
	virtual void OnCancel();
	virtual void OnUpdate();
	virtual void OnUserDocuments();
	virtual void LanguageSwitch( int lang_id );
	DECLARE_MESSAGE_MAP()
	DECLARE_DHTML_EVENT_MAP()
};
